layui.use(['layer', 'table', 'admin',  'form','ax'], function () {
    var $ = layui.$;
    var table = layui.table;
    var $ax = layui.ax;
    var admin = layui.admin;
    var form = layui.form;
    var layer = layui.layer;
    /**
     * 管理
     */
    var ZxChengbenMingxi = {
        tableId: "zxChengbenMingxiTable"
    };

    /**
     * 初始化表格的列
     */
    ZxChengbenMingxi.initColumn = function () {
        return [[
            // {type: 'checkbox'},
            {field: 'btyZxChengbenMingxiId', hide: true, title: ''},
            {field: 'btyBrandIdView', sort: true, title: '门店'},
            {field: 'btyZxChengbenId', sort: true, hide: true,title: '成本'},
            {field: 'btyyBxdaIdView', sort: true, title: '报销人'},
            {field: 'btyZxKemuIdView', sort: true, title: '科目'},
            {field: 'qtkm', sort: true, title: '其他科目'},

            {field: 'jine', sort: true, title: '金额',totalRow: true},
            {field: 'companyView', sort: true, title: '抽点',totalRow: true},

            {field: 'beizhu', sort: true, title: '备注'}
            // {field: 'status', sort: true, title: '状态'},
            // {field: 'statusView', sort: true, title: '状态显示'},
            // {field: 'delFlag', sort: true, title: ''},
            // {field: 'createUser', sort: true, title: ''},
            // {field: 'createUserName', sort: true, title: ''},
            // {field: 'createTime', sort: true, title: ''},
            // {field: 'updateUser', sort: true, title: ''},
            // {field: 'updateUserName', sort: true, title: ''},
            // {field: 'updateTime', sort: true, title: ''},
            // {field: 'company', sort: true, title: ''},
            // {field: 'srcType', sort: true, title: ''},
            // {field: 'srcValue', sort: true, title: ''},
        ]];
    };

    // 渲染表格
    var tableResult = table.render({
        elem: '#' + ZxChengbenMingxi.tableId,
        //参数来自tzqk.js-mdzx/tzqkMingXi
        url: Feng.ctxPath + '/zxChengbenMingxi/tzqkMingXiList?btyZxMdzxId=' + Feng.getUrlParam("btyZxMdzxId")+'&btyZxKemuId='+Feng.getUrlParam("btyZxKemuId"),
        page: true,
        height: "full-158",
        cellMinWidth: 100,
        totalRow: true,
        cols: ZxChengbenMingxi.initColumn()
    });

});
